60分钟全面掌握Claude Code (Master Claude Code in 60 Minutes)
Creator: 秋芝2046 | Duration: 56 min | Date: 2026-05-05
Part 1: Getting Started (Basics)
What is Claude Code?
- Created by Anthropic in Feb 2025; a terminal-based AI Agent (nicknamed "CC")
- Goes beyond Q&A — it plans and takes actions autonomously using the LLM Loop: prompt → LLM thinks → calls tools → gets results → repeats until done
- Key advantages over other agents:
- Runs locally — direct read/write access to your files, terminal commands
- Superior Harness engineering — the non-LLM design around the model that dramatically improves performance (same model, different harness = different results)
Use Cases
- App development & coding (its origin)
- Copywriting, research, info organization
- Data analysis, spreadsheets, reports
- Content creation, script analysis, asset matching
Installation
- 4 ways to run CC: desktop app, web browser, IDE plugin, terminal (recommended — most native, latest features)
- Pair with an IDE (Cursor, Trae, etc.) for file browsing + manual editing + terminal access
- Method 1: One-line install from Claude Code website → paste in terminal
- Method 2: Have the IDE agent install it for you (handles dependencies/network issues)
- Verify:
claude --version
LLM Configuration
- Best: Claude subscription →
logincommand - Alternative: Domestic/third-party APIs via CC Switch tool — configure API key + base URL before launching CC
- CC Switch also lets you assign models to high/medium/low tiers
First Launch
- Type
claude→ initial setup (language, theme, safety prompts, trust folder) - Ready to chat
Part 2: Interaction & Permission Modes
Three Permission Modes (cycle with Shift+Tab)
| Mode | Behavior |
|---|---|
| Plan Mode | Shows detailed plan first; only executes after your confirmation |
| Default Mode | CC decides what needs approval vs. what it can do directly |
| Auto Edit Mode | Files edited freely; still asks before terminal commands |
- A 4th "YOLO" mode exists (added at launch command) — no confirmations at all. Anthropic found 93% of users just approve anyway.
Ways to Interact
- Text conversation — basic prompting
- @ mention files — precise context injection, saves tokens
- Images — drag or
Ctrl+V(even on Mac, not Cmd+V) for visual references - Slash commands —
/help,/model,/btw(side question outside project context),/simplify(3-agent code review)
Pro Tips
- Shorter prompts = more tokens spent (CC explores more to compensate)
- For long/specific prompts: write requirements in a local file → @ mention it
- Line break in CC terminal:
Option+Enter(Mac) /Ctrl+Enter(Windows) — NOT Shift+Enter (that sends)
Part 3: Managing CC (Safety & Context)
Rollback & Version Control
- Quick undo:
Esctwice or/rewind— rolls back conversation + file edits (but not terminal commands like installs) - Real safety net: Git — treat it as a save system
- CC can install Git, link GitHub, commit, push, rollback — all via natural language
- Recommended workflow: commit after each successful step
Context Window Management
- LLMs degrade as context fills up (60-80% of advertised window is truly effective)
/compact— compresses past conversation, keeps key info, frees space/clear— wipes everything (or just open a new terminal)/context— shows detailed token usage breakdown- Enable persistent context display via a config command (requires terminal restart)
- Personal rule: compact when usage exceeds ~60%
Resuming Conversations
/resume— pick from conversation historyclaude -c— continue last conversation directly
Part 4: Personalization (Making CC Work for You)
Layer 1: CLAUDE.md (Highest Priority — Always Loaded)
Three levels:
| Level | Location | Scope |
|---|---|---|
| Global | ~/.claude/CLAUDE.md |
All projects, personal only |
| Project | <project-root>/CLAUDE.md |
This project, shared via Git |
| Folder | <subfolder>/CLAUDE.md |
Files in that subfolder |
- Create project-level:
/init(analyzes project, writes structure) - Create/edit global:
/memory→ select global CLAUDE.md - Best practice: Start with high-level principles; gradually add lessons from CC's mistakes
- Don't make it too dense — keep it focused on unchanging rules + error corrections
Layer 2: Auto Memory (Second Priority — On-Demand)
- Enable via
/memory→ toggle on - A background agent silently records:
- User info (who you are, role)
- Feedback (corrections: "not this, do that")
- Project info (progress, decisions, tech choices)
- External resources (document locations, references)
- Stored as files in
.claude/projects/<path>/memory/ - Only
MEMORY.md(index) is loaded initially; details read on-demand - Project-scoped (doesn't transfer between projects)
- You can tell CC to forget things it remembered incorrectly
Layer 3: Custom Docs (Self-Built Memory)
- Write your own reference files (brand guidelines, style guides, etc.)
- Reference them in CLAUDE.md: "When modifying frontend visuals, refer to
brand-guide.md" - Essentially: "inject compressed context at the right moments"
Part 5: Advanced Extensions
Skills (Professional Instruction Manuals for AI)
- Four types: knowledge-based, process-based, tool-based, hybrid
- Only metadata (name + trigger description) is loaded into context; full content loaded only when invoked
- Install: Place skill folder in
.claude/skills/(global) or project.claude/skills/ - Invoke: Automatically (LLM decides), manually (
/skill-name), or explicitly in prompt - Find skills: Install "Find Skill" skill → search community skills
- Create skills: Install "Skill Creator" skill (by Anthropic) → conversational creation
MCP (Model Context Protocol)
- Adapter connecting AI to external tools/services (Figma, Notion, databases, etc.)
- Downside: token-heavy, hard to run many simultaneously
- Trend: lightweight MCPs → becoming Skills; heavyweight ones → becoming CLIs
CLI (Command Line Interface Tools)
- External services packaged as terminal commands for agent use
- Examples: Feishu CLI (docs, calendar, email), OpenCLI (social media APIs)
- Install: paste tool URL into CC, it handles setup
- More efficient than agents simulating human browsing (screenshots, clicking)
SubAgents (Parallel Workers)
- Each SubAgent has its own context space — doesn't pollute main agent's context
- Can run in parallel for speed
- Auto spawn: CC detects parallelizable work and creates subs automatically
- Manual creation:
/agent→ guided conversational setup - Use case example: Main agent codes while SubAgents research competitor apps simultaneously
Hooks (Automated Triggers)
- "When CC does X, automatically do Y"
- Examples: play sound on task completion, run code formatter before commits, send Feishu notification
- Configure by telling CC what you want in natural language
Plugins (Bundles)
- A package of Skills + SubAgents + Hooks + MCPs combined
- Manage via
/plugin→ discover and install from marketplace
Summary: The Four Stages
| Stage | Key Concepts |
|---|---|
| 1. Get Started | Install, configure LLM, permission modes, basic interaction |
| 2. Stay in Control | Esc/rewind, Git safety net, context management |
| 3. Personalize | CLAUDE.md (3 layers), Auto Memory, custom docs |
| 4. Extend | Skills, MCP, CLI, SubAgents, Hooks, Plugins |
Core insight: You're learning to move from Q&A with AI to systematizing its autonomous work — a transferable skill for any future AI tools.